package com.upoint.sellorderservice.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jsbintask@foxmail.com
 * @date 2018/11/21 9:37
 */
@RequestMapping
@RestController
@RefreshScope
public class ConfigController {
    @Value("${env:defaultenv}")
    private String env;

    @Value("${env2:defaultenv2}")
    private String env2;


    @GetMapping("/config/env")
    public String conifgEnv() {
        return "env: " + env + " env2: " + env2;
    }
}
